<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
	request.setAttribute("path", request.getContextPath());
%>
<script type="text/javascript">
$(function(){
	common.ajaxQuery("${root}/app/user/query");
});
function delUser(userId){
	if(confirm("确定删除此用户!")){
		var url = "${root}/app/user/delete/" + userId;
		common.ajaxSubmit( url ,"","删除用户失败,请重试!","删除用户成功",common.reload("${root}/view/page?loc=user_list&h=h02&n=n01"));
	}
}
</script>
<form class="form-horizontal" id="queryForm">
	<input name="orderName" value="u.id" type="hidden">
	<table class="table table-hover">
		<tr>
			<th>部门:</th>
			<td>
			     <select id="department" name="department" class="input-medium">
						<option value="">所有</option>
						<c:forEach items="${departments }" var="item">
							<option value="${item.key }"><c:out
									value="${item.value.name }" /></option>
						</c:forEach>
				</select>
			</td>
			<th>职位:</th>
			<td>
				<select id="position" name="position" class="input-medium">
					<option value="">所有</option>
					<c:forEach items="${positions }" var="item">
						<option value="${item.key }"><c:out
								value="${item.value.name }" /></option>
					</c:forEach>
				</select>
			</td>
			<th>角色:</th>
			<td>
				<select id="group" name="group" class="input-medium">
					<option value="">所有</option>
					<c:forEach items="${groups }" var="item">
						<option value="${item.key }"><c:out
								value="${item.value.name }" /></option>
					</c:forEach>
			</select>
			</td>
		</tr>
		<tr>
		<th>账号:</th>
			<td>
				<input type="text" class="input-medium" name="id" id="id" />
			</td>
			<th>名称:</th>
			<td>
				<input type="text" class="input-medium" name="name" id="name" />
			</td>
			<th>手机:</th>
			<td>
				<input type="text" class="input-medium" name="mobile" id="mobile" />
			</td>
		
		</tr>
	</table>
	 <div class="form-actions text-center">
		      <button type="button" class="btn btn-primary" onclick="common.ajaxQuery('${root}/app/user/query')">查询</button>
	 </div>
</form>
<div class="table-responsive">
<table class="table table-striped table-bordered">
	<thead>
		<tr >
			<th class="span1 text-center">序号</th>
			<th class="span2 text-center">账号</th>
			<th class="text-center">姓名</th>
			<th class="span2 text-center">手机</th>
			<th class="span2 text-center">状态</th>
			<th class="span4 text-center">操作</th>
		</tr>
	</thead>
	<tbody id="dataList">
	</tbody>
</table>
</div>
